home *** CD-ROM | disk | FTP | other *** search
/ El Mac 9 / El Mac 9.iso / Shareware / Applications / MathPad 2.4 / XFuns / playsynth / playsynth.rsrc / TEXT_128_loadsynth().txt next >
Encoding:
Text File  |  1996-03-31  |  544 b   |  12 lines

  1. ------- loadsynth(wave)
  2. -- Load the wave-table sound synthesizer with the wave shape given by a 512 sample array "wave". Once loaded, the wave-table remains in effect until another loadsynth() is evaluted.
  3. -- Using loadsynth(n) will set the synthesizer to use square waves. The parameter "n" (0 to 255) sets the edge shape. Zero is closest to sine. 
  4.  
  5. loadsynth(255):;       playsynth(72,2,1):
  6. loadsynth(0):;         playsynth(72,2,1):
  7.  
  8. sinewave[i] = sin(2*pi*Radians*i/511) dim[512]
  9. plotline sinewave
  10.  
  11. loadsynth(sinewave):;  playsynth(72,2,1):
  12.